'use strict';

import Vue from 'vue';
import Revue from 'revue';
import { compose,
         createStore } from 'redux';
import persistState from 'redux-localstorage';

import { tabReducer } from './modules/tab/reducer';
import * as actions from './modules/tab/action';
import { getStreamers } from './modules/tab/initializer';

const createPersistentStore = compose(
  persistState()
)(createStore);
const reduxStore = createPersistentStore(tabReducer, getStreamers());
const store = new Revue(Vue, reduxStore, actions);

export default store;
